package models
{
	public class Resource
	{
		protected var _node:XML;
		
		public function Resource(node:XML) {
			_node = node;
		}
		
		public function setXML(node:XML) : void {
			_node = node;
		}
		
		public function toXML(deep:Boolean = true) : XML {
			var xml:XML = _node;
			if(!deep) {
				delete xml.*;
			}
			return xml;
		}
		
		public function toString() : String {
			return toXML().toXMLString();
		}
	}
}